package com.yb.nowcoder;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main17 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = Integer.parseInt(in.next());
            List<String> list = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                list.add(in.next());
            }
            Collections.sort(list);
            list.forEach(string -> System.out.println(string));
        }
    }
}
